/**
 * 
 */
package fr.beans;

import java.util.List;

/**
 * @author Altenide-mov.
 *
 */

public class User extends BeanBase {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2741480937781898953L;

	/**
	 * @login
	 */
	private String login;

	/**
	 * @surname
	 */
	private String surname;

	/**
	 * @email
	 */
	private String email;

	/**
	 * @pwd
	 */
	private String pwd;

	/**
	 * @adress
	 */
	private String adress;

	/**
	 * @city
	 */
	private String city;

	/**
	 * @zipCode
	 */
	private int zipCode;

	/**
	 * @listArticle
	 */
	private List<Article> listArticle;

	/**
	 * @return the login
	 */
	public final String getLogin() {
		return login;
	}

	/**
	 * @param plogin the login to set
	 */
	public final void setLogin(final String plogin) {
		this.login = plogin;
	}

	/**
	 * @return the surname
	 */
	public final String getSurname() {
		return surname;
	}

	/**
	 * @param psurname the surname to set
	 */
	public final void setSurname(final String psurname) {
		this.surname = psurname;
	}

	/**
	 * @return the email
	 */
	public final String getEmail() {
		return email;
	}

	/**
	 * @param pemail the email to set
	 */
	public final void setEmail(final String pemail) {
		this.email = pemail;
	}

	/**
	 * @return the pwd
	 */
	public final String getPwd() {
		return pwd;
	}

	/**
	 * @param ppwd the pwd to set
	 */
	public final void setPwd(final String ppwd) {
		this.pwd = ppwd;
	}

	/**
	 * @return the adress
	 */
	public final String getAdress() {
		return adress;
	}

	/**
	 * @param padress the adress to set
	 */
	public final void setAdress(final String padress) {
		this.adress = padress;
	}

	/**
	 * @return the city
	 */
	public final String getCity() {
		return city;
	}

	/**
	 * @param pcity the city to pset
	 */
	public final void setCity(final String pcity) {
		this.city = pcity;
	}

	/**
	 * @return the zipCode
	 */
	public final int getZipCode() {
		return zipCode;
	}

	/**
	 * @param pzipCode the pzipCode to set
	 */
	public final void setZipCode(final int pzipCode) {
		this.zipCode = pzipCode;
	}

	/**
	 * @return the listArticle
	 */
	public final List<Article> getListArticle() {
		return listArticle;
	}

	/**
	 * @param plistArticle the listArticle to set
	 */
	public final void setListArticle(final List<Article> plistArticle) {
		this.listArticle = plistArticle;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public final String toString() {
		final int maxLen = 2;
		return "User [login="
				+ login
				+ ", surname="
				+ surname
				+ ", email="
				+ email
				+ ", pwd="
				+ pwd
				+ ", adress="
				+ adress
				+ ", city="
				+ city
				+ ", zipCode="
				+ zipCode
				+ ", listArticle="
				+ (listArticle != null ? listArticle.subList(0,
						Math.min(listArticle.size(), maxLen)) : null)
				+ ", getId()=" + getId() + ", getName()=" + getName() + "]";
	}






}
